finding the LCD rational expressions